package com.onpositive.wiki3.db.catmodel.matches.classify;

import com.onpositive.wiki3.db.catmodel.Categories;
import com.onpositive.wiki3.db.catmodel.Category;

public class HierarchyJoiner extends AbstractRecordingMatcher {

	public HierarchyJoiner(RelationStore store) {
		super(store);
	}

	@Override
	public int accept(Category st) {
		Category relationCategory = relationCategory(st);
		if (relationCategory != null) {
			Category[] childCategories = st.getChildCategories();
			//HashMap<Category, Integer>mm=new HashMap<Category, Integer>();
			for (Category c : childCategories) {
				Category relationCategory2 = relationCategory(c);
				
				Category[] parentsCategories = relationCategory2.getParentsCategories();
				
			}
		}
		return 0;
	}

	protected Category relationCategory(Category st) {
		Categories categories = toRecord.get(RelationConstants.IS_A);
		return categories.get(st.id());
	}

}
